using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using FutureOpen.Core;
using FutureOpen.Core.func;
using FutureOpen.Core.func.db;
using System.Collections.Generic;
using System.Text;

public partial class UsrArts : FutureOpen.Web.Pages.PageBase
{
    public int uid;
    protected void Page_Load(object sender, EventArgs e)
    {
        base.PageInit();
        if (base.usrid > 0)
        {
            this.uid = base.usrid;
        }
        else
        {
            if (IsLogin())
            {
                uid = this.MyUsr;
            }
        }
       
    }
    /*
    private void BindUsrArts(int start, int count)
    {
        MyUsr myusr = new MyUsr();
     
        if (myusr.Usr != null)
        {
            IList<Art> artList = myusr.GetUsrArts(start, count);
            this.GridView1.DataSource = artList;
            this.GridView1.DataBind();           
        }
    }
    public string GetType(object obj)
    {
        short t = (short)obj;
        return ArtType.GetText(t);
    }


    protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        MyArt myart = new MyArt();        
        int id = Int32.Parse(GridView1.DataKeys[e.RowIndex].Value.ToString());
        Art art = myart.GetArtByID(id);
        myart.DelArt(art);

        Response.Redirect("UsrArts.aspx");
    }
   

    protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
    {
        int id = Int32.Parse(GridView1.DataKeys[e.NewEditIndex].Value.ToString());
        Response.Redirect("ArtUpdate.aspx?artid=" + id);
    }
    protected void AspNetPager1_PageChanging(object src, Wuqi.Webdiyer.PageChangingEventArgs e)
    {
        AspNetPager1.CurrentPageIndex = e.NewPageIndex;
        BindUsrArts((e.NewPageIndex - 1) * 30, 30);
    }
    */
}
